<template>
  <div class="whole">
    <div class="head">
      <van-nav-bar class="head" title="关于零食" left-text="" left-arrow  @click-left="click"/>
    </div>
    <van-grid>
      <van-grid-item>
        <img src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fimg.yzcdn.cn%2Fupload_files%2F2016%2F05%2F07%2F146258897889374831.gif%3FimageView2%2F2%2Fw%2F580%2Fh%2F580%2Fq%2F75%2Fformat%2Fgif&refer=http%3A%2F%2Fimg.yzcdn.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1642831582&t=dabf2e0c00ac96029b914148fdde802d" alt="" width="358px" />
        <span>饼干比较试验</span>
      </van-grid-item>
    </van-grid>
    <van-row type="flex" justify="center" class="row">
      <van-col span="6">
        <p>已报名商家</p>
        <span>125</span>
      </van-col>
      <van-col span="6">
        <p>推荐人数</p>
        <span>2658</span>
      </van-col>
      <van-col span="6" style="border: none">
        <p>访问量</p>
        <span>12509</span>
      </van-col>
    </van-row>

    <van-row class="main">
      <van-col span="4">排名</van-col>
      <van-col span="10">名称</van-col>
      <van-col span="5">人气榜</van-col>
      <van-col span="5">口碑值</van-col>
      <van-row v-for="(item, index) in tableData" :key="index" class="main1" @click="onclick">
        <van-col span="4" >{{ index + 1 }}</van-col>
        <van-col span="10">{{ item.name }}</van-col>
        <van-col span="5">{{ item.Popularity }}</van-col>
        <van-col span="5">{{ item.value }}</van-col>
      </van-row>
    </van-row>
    <!-- 底部按钮 -->
    <van-button type="primary" block to="/sign">商家报名</van-button>
  </div>
</template>
<script>
export default {
  data() {
    return {
      tableData: [
        {
          name: "华夫",
          Popularity: "1200",
          value: "98",
        },
        {
          name: "雪花酥",
          Popularity: "1000",
          value: "95"
        },
        {
          name: "酥薄脆饼",
          Popularity: "999",
          value: "90",
        },
        {
          name: "巧克力饼干",
          Popularity: "888",
          value: "84",
        },
      ],
    };
  },
  methods: {
    indexMethod(index) {
      return index + 1;
    },
     onclick(){
      this.$router.push({path:'/NPSlistDetails'}).catch((error)=>error)
    },
    click(){
           this.$router.push({path:'/NPSmouth'}).catch((error)=>error)
    }
  },
};
</script>
<style scoped lang="less">
.whole {
  height: 100%;
  .head {
    width: 100%;
    height: 51px;
    color: rgba(80, 80, 80, 1);
    background-color: rgba(239, 239, 239, 1);
    font-size: 14px;
    line-height: 150%;
    text-align: center;
    /deep/.van-nav-bar .van-icon {
      color: rgba(153, 153, 153, 1);
    }
    /deep/.van-nav-bar__title {
      color: rgba(42, 131, 78, 1);
      font-size: 18px;
    }
    .van-row {
      height: 100%;
      .van-icon {
        width: 24px;
        height: 24px;
        left: 18px;
        top: 13px;
        font-size: 24px;
        color: rgba(153, 153, 153, 1);
      }
      .van-col {
        height: 100%;
        color: rgba(42, 131, 78, 1);
        font-size: 18px;
      }
    }
  }
  .van-grid {
    width: 358px;
    height: 184px;
    overflow: hidden;
    .van-grid-item {
      width: 358px;
      font-size: 16px;
      line-height: 150%;
      margin-top: 10px;
      margin-left: 8px;
      span {
        position: absolute;
        left: 17px;
        top: 136px;
        color: rgba(255, 255, 255, 1);
        text-shadow: rgba(0, 0, 0, 0.5) 0px 2px 2px;
        font-size: 23px;
      }
    }
  }
  .row {
    margin-top: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
    justify-content: center;
    margin: 0 13px;
    .van-col {
      border-right: 1px solid rgba(153, 153, 153, 1);
      margin: 20px 0;
      text-align: center;
      P {
        width: 70px;
        height: 21px;
        color: rgba(80, 80, 80, 1);
        font-size: 14px;
        margin-left: 12px;
        margin-bottom: 10px;
      }
      span {
        width: 35px;
        height: 21px;
        color: rgba(80, 80, 80, 1);
        font-size: 14px;
        text-align: center;
        font-weight: bold;
      }
    }
  }
  .main {
    font-size: 14px;
    padding: 16px;
    color: rgba(80, 80, 80, 1);
    font-weight: bold;
    .van-col{
      margin-bottom: 20px;
    }
    .main1 {
   
      font-size: 12px;
      font-weight: normal;
      .van-col:nth-child(1),.van-col:nth-child(3),.van-col:nth-child(4){
     padding-left: 10px;
      margin-bottom: 10px;
      }
    }
  }
  .van-button {
    color: rgba(255, 255, 255, 1);
    background-color: rgba(42, 131, 78, 1);
    position: fixed;
    bottom: 0;
  }
}
</style>
